package com.lengxf.aPlugins.bizType.model;

import com.lengxf.aPlugins.bizType.BizInterface;
import com.lengxf.aPlugins.bizType.GroupSubTypeEnum;
import com.lengxf.aPlugins.bizType.GroupTypeEnum;
import com.lengxf.aPlugins.bizType.InteractionModel;

import java.util.List;

/**
 * 心跳逻辑
 * 只需要在10 点 和 20点添加
 */
public class HeartBeat implements BizInterface {

    @Override
    public List<InteractionModel> getInteractionModelList() {
        return List.of(
                requestInteractionModel(),
                dataInteractionModel()
        );
    }

    public static InteractionModel requestInteractionModel() {
        List<String> list = List.of("Heart_IOT");
        return new InteractionModel(GroupTypeEnum.SUBSCRIPTION, GroupSubTypeEnum.REQUEST, list);
    }


    public static InteractionModel dataInteractionModel() {
        List<String> list = List.of(
                "Heart_MES"
        );
        return new InteractionModel(GroupTypeEnum.WRITE, GroupSubTypeEnum.WRITE, list);
    }

}
